import { createSlice } from '@reduxjs/toolkit'

export const stopwatch = createSlice({
    name: 'stopwatch',
    initialState: {
        value:60
    },
    reducers: {
        decrement: (store) => { 
             store.value -= 1
        },
        reset: (store) => {
            store.value = 60
         }
    }
})
export const { decrement,reset } = stopwatch.actions

export default stopwatch.reducer